#ifndef __SCNS_W25QXX_C_H__
#define __SCNS_W25QXX_C_H__

#include "ScnsW25qxx.h"

#if defined(SCNS_W25QXX_ENABLE)&&SCNS_W25QXX_ENABLE==1

#include "ScnsYing.h"
#include "ScnsBspW25qxx.c.h"

typedef struct
{
    uint8 isQspi;
}ScnsBspW25qxxConfig;

extern const ScnsBspW25qxxConfig scnsBspW25qxxConfig[SCNS_W25QXX_MAX];

extern ScnsStatus scnsBspW25qxxInit(ScnsW25qxxEnum w25N);
extern ScnsStatus scnsBspW25qxxPostInit(ScnsW25qxxEnum w25N);

extern ScnsStatus scnsBspW25qxxSpiW(ScnsW25qxxEnum w25N,const uint8*val,uint32 num);
extern ScnsStatus scnsBspW25qxxSpiWR(ScnsW25qxxEnum w25N,const uint8*val,uint32 num,uint8*val2,uint32 num2);
extern ScnsStatus scnsBspW25qxxSpiWW(ScnsW25qxxEnum w25N,const uint8*val,uint32 num,const uint8*val2,uint32 num2);
extern void scnsBspW25qxxSpiSetCs(ScnsW25qxxEnum w25N,uint8 dat);

extern ScnsStatus scnsBspW25qxxQspiSendCmd(ScnsW25qxxEnum w25N,uint32 instruction,uint32 instructionMode,uint32 address,uint32 addressMode,uint32 addressSize,uint32 dataMode,uint32 dataSize,uint32 alternateBytes,uint32 alternateByteMode,uint32 alternateBytesSize,uint8 needDummy);
extern ScnsStatus scnsBspW25qxxQspiR(ScnsW25qxxEnum w25N,uint8 buf[]);
extern ScnsStatus scnsBspW25qxxQspiW(ScnsW25qxxEnum w25N,const uint8 buf[]);
extern ScnsStatus scnsBspW25qxxQspiEnterMemoryMapped(ScnsW25qxxEnum w25N,uint32 instruction,uint32 instructionMode,uint32 addressMode,uint32 addressSize,uint32 dataMode,uint32 alternateBytes,uint32 alternateByteMode,uint32 alternateBytesSize,uint8 needDummy);

/*******************************BSP.C.H*******************************

#define SCNS_BSP_W25QXX_SPI_ENABLE      1
#define SCNS_BSP_W25QXX_QSPI_ENABLE     1

#define SCNS_BSP_W25QXX_QSPI_INSTRUCTION_1_LINE         QSPI_INSTRUCTION_1_LINE
#define SCNS_BSP_W25QXX_QSPI_INSTRUCTION_4_LINES        QSPI_INSTRUCTION_4_LINES
#define SCNS_BSP_W25QXX_QSPI_ADDRESS_NONE               QSPI_ADDRESS_NONE
#define SCNS_BSP_W25QXX_QSPI_DATA_NONE                  QSPI_DATA_NONE
#define SCNS_BSP_W25QXX_QSPI_ADDRESS_8_BITS             QSPI_ADDRESS_8_BITS
#define SCNS_BSP_W25QXX_QSPI_DATA_1_LINE                QSPI_DATA_1_LINE
#define SCNS_BSP_W25QXX_QSPI_DATA_4_LINES               QSPI_DATA_4_LINES
#define SCNS_BSP_W25QXX_QSPI_ADDRESS_32_BITS            QSPI_ADDRESS_32_BITS
#define SCNS_BSP_W25QXX_QSPI_ADDRESS_24_BITS            QSPI_ADDRESS_24_BITS
#define SCNS_BSP_W25QXX_QSPI_ADDRESS_1_LINE             QSPI_ADDRESS_1_LINE
#define SCNS_BSP_W25QXX_QSPI_ADDRESS_4_LINES            QSPI_ADDRESS_4_LINES
#define SCNS_BSP_W25QXX_QSPI_ALTERNATE_BYTES_8_BITS     QSPI_ALTERNATE_BYTES_8_BITS
#define SCNS_BSP_W25QXX_QSPI_ALTERNATE_BYTES_NONES      QSPI_ALTERNATE_BYTES_NONE
#define SCNS_BSP_W25QXX_QSPI_ALTERNATE_BYTES_1_LINE     QSPI_ALTERNATE_BYTES_1_LINE
#define SCNS_BSP_W25QXX_QSPI_ALTERNATE_BYTES_4_LINES    QSPI_ALTERNATE_BYTES_4_LINES

*/
/*******************************BSP.H*******************************
typedef enum
{
    SCNS_W25QXX_SPI,
    SCNS_W25QXX_MAX,
}ScnsW25qxxEnum;



*/



#endif
#endif
